<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1" charset="utf-8">
    <link rel="stylesheet" href="../javascripts/lib/jqm/jquery.mobile-1.4.3.min.css"/>
      <link rel="stylesheet" href="../stylesheets/jscrollpane1.css"/>
    <link rel="stylesheet" href="../stylesheets/main.css"/>
    <script src="../javascripts/lib/jq/jquery-2.1.1.min.js"></script>
    <script src="../javascripts/lib/jqm/jquery.mobile-1.4.3.min.js"></script>
    <script type="text/javascript" charset="utf-8">
    </script>
    <title></title>
  </head>
  <body>
    <div class="a" data-role="page" id="msgDetailPage">
      <div data-role="header" id="header">
          <a class="ui-btn ui-icon-back ui-btn-icon-left" href="#msgListPage">返回</a>
          <h1>详细信息</h1>
      </div>
      <div data-role="content" data-theme="c" >
          <script type="text/javascript">
              $('#pubchat').click(function(){
                  $.get('/publicChat?sessionid=<%=sid%>',function(result){
                      if(result=='ok'){
                          alert('会话已公开！');
                          //window.location.reload();
                          $('#ispub').html('对话已公开');
                      }else{
                          alert('会话公开失败！');
                      }

                  });
              });

          </script>
          <style>

          img,input{
              border:none;
          }

          a{
              color:#198DD0;
              text-decoration:none;
          }
          a:hover{
              color:#ba2636;
              text-decoration:underline;
          }
          a{blr:expression(this.onFocus=this.blur())}/*去掉a标签的虚线框，避免出现奇怪的选中区域*/
          :focus{outline:0;}


          .talk_record{
              width: 100%;

              overflow: hidden;
              /*border-bottom-width: 1px;
              border-bottom-style: solid;
              border-bottom-color: #434343;*/
              margin: 0px;
              /*background-color: #D3D3D3 ;*/
          }

          * html .jspCorner{margin:0 -3px 0 0;}
          .jp-container{width:100%;position:relative;background-color: transparent;float:left;}


          /*讨论区*/
          .jp-container .talk_recordbox{
              min-height:80px;
              color: #afafaf;
              margin-bottom: 5px;
              padding-top: 5px;
              padding-right: 0px;
              padding-left: 0px;
              padding-bottom: 0px;
          }

          .jp-container .talk_recordbox:first-child{border-top:none;}
          .jp-container .talk_recordbox:last-child{border-bottom:none;}
          .jp-container .talk_recordbox .talk_recordtextbg{
              float:left;
              width:10px;
              height:30px;
              display:block;
              background-image: url(../image/talk_recordtext.png);
              background-repeat: no-repeat;
              background-position: left top;}
          .jp-container .talk_recordbox .talk_recordtext{
              -moz-border-radius:5px;
              -webkit-border-radius:5px;
              border-radius:5px;
              background-color:#b8d45c;
              width:70%;
              height:auto;
              display:block;
              padding: 5px;
              float:left;
              color:#333333;
          }
          .jp-container .talk_recordbox h3{
              font-size:14px;
              padding:2px 0 5px 0;
              text-transform:uppercase;
              font-weight: 100;

          }
          .jp-container .talk_recordbox .user {
              float:left;
              display:inline;
              height: 45px;
              width: 45px;
              margin-top: 0px;
              margin-right: 0px;
              margin-bottom: 0px;
              margin-left: 0px;
              font-size: 12px;
              line-height: 20px;
              text-align: center;
          }
          /*自己发言样式*/
          .jp-container .talk_recordboxme{
              display:block;
              min-height:80px;
              color: #afafaf;
              /*margin-top: 5px;*/
              margin-bottom: 5px;
              padding-top: 5px;
              padding-right: 0px;
              padding-left: 0px;
              padding-bottom: 0px;
          }
          .jp-container .talk_recordboxme .talk_recordtextbg{
              float:right;
              width:10px;
              height:30px;
              display:block;
              margin-bottom: 5px;
              background-image: url(../image/talk_recordtextme.png);
              background-repeat: no-repeat;
              background-position: left top;}

          .jp-container .talk_recordboxme .talk_recordtext{
              -moz-border-radius:5px;
              -webkit-border-radius:5px;
              border-radius:5px;
              background-color:#D3D3D3;
              width:70%;
              margin-bottom: 5px;
              height:auto;
              padding: 5px;
              color:#666;
              font-size:12px;
              float:right;

          }
          .jp-container .talk_recordboxme h3{
              font-size:14px;
              padding:2px 0 5px 0;
              text-transform:uppercase;
              font-weight: 100;
              color:#333333;

          }
          .jp-container .talk_recordboxme .user{
              float:right;
              height: 45px;
              width: 45px;
              margin-top: 0px;
              margin-right: 0px;
              margin-bottom: 0px;
              margin-left: 0px;
              font-size: 12px;
              line-height: 20px;
              text-align: center;
              display:inline;
          }
          .talk_time{
              color: #666;
              text-align: right;
              width: 100%;
              display: block;
          }
          </style>
          <!--<div class="orderlistdes">
              历史记录
          </div>-->
          <!--<div><a href="#dialogmsg" data-rel="dialog">A Dialog (dialog)</a></div>-->
          <div class="balance" style="color: #00B2EE;">
              日期：<%=currentDate%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              <%if(flag==1){%>
              <span id="ispub"><%if(ispub!=0){%>对话已公开<%}else{%><a id="pubchat" href='#'>点击公开对话</a><%}%></span>
              <%}else{%>
              <span id="ispub"><%if(ispub!=0){%>用户已公开对话<%}else{%>对话未公开<%}%></span>
              <%}%>

          </div>
              <%if(messageList.length>0){%>
              <!--<messageList.forEach(function(msg){>-->

                    <div class="talk_record">

                    <div id="jp-container" class="jp-container">
                    <%for(var i=0;i<messageList.length;i++){%>
                    <%if(messageList[i].isreceive==0){%>
                        <div class="talk_recordboxme">
                            <div class="user"><img src="<%=messageList[i].headimgurl%>"/><%=messageList[i].send_openid%></div>
                            <div class="talk_recordtextbg">&nbsp;</div>
                            <div class="talk_recordtext">
                                <h3><%=messageList[i].sendcontent%></h3>
                                <span class="talk_time"><%=messageList[i].date%></span>
                            </div>
                        </div>
                    <%}else{%>
                        <div class="talk_recordbox">
                            <div class="user"><img src="<%=messageList[i].headimgurl%>"/><%=messageList[i].send_openid%></div>
                            <div class="talk_recordtextbg">&nbsp;</div>
                            <div class="talk_recordtext">
                                <h3><%=messageList[i].sendcontent%></h3>
                                <span class="talk_time"><%=messageList[i].date%></span>
                            </div>
                        </div>
                        <%}%>

                    <%}%>
                    </div>
                    </div>
                  <%}%>

      </div>
    </div>

<!--  <div data-role="page" id="dialogmsg" data-close-btn="right">
      <div data-role="header">
          <h1>Dialog</h1>
      </div>

      <div role="main" class="ui-content">
          <h1>Right close button</h1>
          <p>This is a regular page, styled as a dialog. To create a dialog, just link to a normal page and include a transition and <code>data-rel="dialog"</code> attribute.</p>
          <a href="#" data-role="button" data-rel="back" data-theme="b">Ok, I get it</a>
      </div>

  </div>-->
  </body>
</html>